package com.wengzw.springcloud.service;

import com.wengzw.springcloud.entities.CommonResult;
import com.wengzw.springcloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE") //声明找哪个微服务
public interface PaymentFeignService {
    @GetMapping(value = "/payment/get/{id}") //调用地址8001上的
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);
}
